import { showSuccessToast, showFailToast, setToastDefaultOptions, showToast } from 'vant'

setToastDefaultOptions({ duration: 2000, teleport: '#app' })
export default {
  // 顶部成功提示
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  successMsg(msg: string) {
    showSuccessToast(msg)
  },
  // 顶部失败提示
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  errorMsg(msg: string) {
    showFailToast(msg)
  },
  showToast(msg: string) {
    showToast(msg)
  },
}
